-- 取ods层昨天数据 落入dwd,数据只做插入，不做更新
insert overwrite table spmi_dwd.dwd_spmi_temporary_fee_bill_base_dt partition(dt)
    select
id
,waybill_no
,waybill_time
,waybill_date
,send_network_id
,send_network_code
,send_network_name
,financial_center_id
,financial_center_code
,financial_center_name
,sender_province_id
,sender_province_name
,receiver_province_id
,receiver_province_name
,piece_network_id
,piece_network_code
,piece_network_name
,product_type_id
,product_type_code
,product_type_name
,destination_province_id
,destination_province_code
,destination_province_name
,destination_city_id
,destination_city_code
,destination_city_name
,package_charge_weight
,opt_fee
,tof_fee
,ele_face_fee
,base_piece_fee
,create_by_name
,create_time
,create_by
,piece_fee
,cast(to_date(waybill_time) as string) as dt
    from spmi_ods.spmi_temporary_fee_bill
     where dt  = '{{ execution_date | cst_ds }}'
distribute by dt, pmod(hash(rand()),32);